package com.demo.steammanagement.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 记录用户的租用历史
 * @TableName rentals
 */
@TableName(value ="rentals")
@Data
public class Rentals implements Serializable {
    /**
     * 记录ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long userId;

    /**
     * 账号ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long gameAccountId;

    /**
     * 游戏ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long gameId;

    /**
     * 租用开始时间
     */
    private Date startTime;

    /**
     * 租用结束时间
     */
    private Date endTime;

    /**
     * 租用状态 1进行中 0已结束
     */
    private Integer status;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;

    /**
     * 更新时间
     */
    private Date updatedAt;

    private String name;

    private String account;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 上次延长时间
     */
    private Date lastExtendTime;
}